package com.angel.bo.admin.service.impl;

import com.angel.bo.admin.mapper.RoleMapper;
import com.angel.bo.admin.service.RoleService;
import com.angel.bo.beans.admin.entity.Role;
import com.angel.bo.cache.annotation.ServiceCache;
import com.angel.bo.cache.constant.ServiceCacheActionEnum;
import com.angel.bo.common.service.impl.BaseServiceImpl;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;


/**
 * 
 *
 * @author ${author}
 * @email haibo.mei@ge.com
 * @date 2018-02-01 14:32:20
 */
@Service
@Transactional(rollbackFor = Exception.class)
public class RoleServiceImpl extends BaseServiceImpl<RoleMapper,Role> implements RoleService {

    @Override
    @ServiceCache(action = ServiceCacheActionEnum.ADD,keyExpression = "#roleId")
    public Role selectById(Integer roleId) {
        return super.selectById(roleId);
    }

    @Override
    @ServiceCache(action = ServiceCacheActionEnum.ADD,keyExpression = "#role.roleId")
    public Role selectOne(Role role) {
        return super.selectOne(role);
    }
}



